package com.zk.yygh.hosp_client.service;

import com.zk.yygh.model.hosp.Schedule;
import com.zk.yygh.vo.hosp.ScheduleOrderVo;
import com.zk.yygh.vo.order.SignInfoVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: 张凯
 * @date: 2022/6/20 - 15:44
 */
@FeignClient("service-hosp")
@Repository
public interface HospFeignClient {

    @ApiOperation(value = "获取下单引用的签名信息：远程调用")
    @GetMapping("/admin/hosp/hospitalSet/inner/getSignInfoVo/{hoscode}")
    SignInfoVo getSignInfoVo(@PathVariable("hoscode") String hoscode);

    @ApiOperation(value = "根据排班id获取预约下单数据")
    @GetMapping("/admin/hosp/hospitalSet/inner/getScheduleOrderVo/{scheduleId}")
    ScheduleOrderVo getScheduleOrderVo(@PathVariable("scheduleId") String scheduleId);

    @ApiOperation("远程调用根据id获取排班信息")
    @GetMapping("/admin/hosp/schedule/getScheduleById/{id}")
    Schedule getScheduleById(@PathVariable("id") String id);

    @ApiOperation("远程调用更新排班信息")
    @PostMapping("/admin/hosp/schedule/update/schedule")
    void updateSchedule(@RequestBody Schedule schedule);
}
